package com.novax.ex.activity.provider.service;

import com.novax.ex.activity.infrastructure.entity.TaskLanguage;
import com.novax.ex.activity.infrastructure.mapper.TaskLanguageMapper;
import com.novax.ex.common.base.BaseMapper;
import com.novax.ex.common.base.BaseService;
import org.springframework.stereotype.Service;

import jakarta.annotation.Resource;
import java.util.List;

/**
 * @Description: 标题多语言配置 service
 * @Author: ChenXi
 * @Date:  2023/6/25 11:09
 **/
@Service
public class TaskLanguageService extends BaseService {

    @Resource
    private TaskLanguageMapper taskLanguageMapper;

    @Override
    protected BaseMapper getBaseMapper() {
        return taskLanguageMapper;
    }

    /**
     * @Description:  根据简介表id或者任务表id查询多语言
     * @Author: ChenXi
     * @Date:  2023/6/25 10:58
     * @param id
     * @return: java.lang.Object
     **/
    public List<TaskLanguage> findByParentId(Long id, Integer type) {
        return taskLanguageMapper.findByParentId(id, type);
    }
}
